Skip to content

Add more marginalization options#154

Merged
andreicuceu merged 9 commits intomasterfrom
marginalization-options
Mar 12, 2026
Merged

Add more marginalization options#154
andreicuceu merged 9 commits intomasterfrom
marginalization-options

Conversation

@andreicuceu
Copy link
Owner

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds configuration options to change how small-scale marginalization templates are handled during fitting, including an on-the-fly template-coefficient fit mode and an option to build templates that match data-bin structure; also adds a small CLI runner.

Changes:

  • Add control.marginalize_in_fit to optionally fit marginalization-template coefficients on the fly during chi2.
  • Add model.marginalize-match-data-bins and plumb it through config building and template construction.
  • Add bin/run_vega.py convenience entrypoint.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
vega/vega_interface.py Adds marginalize_in_fit wiring, applies fitted template corrections in chi2, and guards global-cov updates when cov_marg_update is None.
vega/data.py Extends Data init to support marginalize_in_fit by optionally skipping covariance updates and adjusting the coefficient-solver setup.
vega/correlation_item.py Adds marginalize-match-data-bins and a new template-building path that groups model bins by nearest data bins.
vega/build_config.py Adds the new marginalize-match-data-bins option to generated configs.
bin/run_vega.py Adds a simple CLI wrapper around vega.run_vega.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 11.36364% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.90%. Comparing base (ed7849e) to head (c57d500).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
vega/correlation_item.py 7.14% 13 Missing ⚠️
vega/vega_interface.py 13.33% 10 Missing and 3 partials ⚠️
vega/data.py 15.38% 11 Missing ⚠️
vega/build_config.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
- Coverage   37.12%   36.90%   -0.23%     
==========================================
  Files          30       30              
  Lines        4180     4208      +28     
  Branches      788      798      +10     
==========================================
+ Hits         1552     1553       +1     
- Misses       2470     2494      +24     
- Partials      158      161       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andreicuceu andreicuceu merged commit 6ca4c06 into master Mar 12, 2026
4 of 6 checks passed
@andreicuceu andreicuceu deleted the marginalization-options branch March 12, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants